package com.java.manage.controller;

import com.java.common.model.Result;
import com.java.manage.model.Supply;
import com.java.manage.service.SupplyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * 供应商信息管理
 */
@RestController
@RequestMapping("/supply")
public class SupplyController {

    @Autowired
    private SupplyService supplyService;

    @PostMapping("/list")
    public Result list(@RequestBody Supply supply) {
        return supplyService.list(supply);
    }

    @PostMapping("/save")
    public Result save(@RequestBody Supply supply) {
        return supplyService.save(supply);
    }

    @PostMapping("/modify")
    public Result modify(@RequestBody Supply supply) {
        return supplyService.modify(supply);
    }

    @GetMapping("/remove")
    public Result remove(int[] ids) {
        return supplyService.remove(ids);
    }
    /**
     * 查询类型
     * @return
     */
    @PostMapping("/listSupp")
    public Result listSupp() {
        return supplyService.listSupp();
    }
}
